import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;

/*
 * 		I MADE A GRID DERP
 *  	Is now JavaDoc
 */

public class GameClient extends JFrame
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public static void main(String args[])
	{
		new GameClient();
	}

	public GameClient()
	{

		JFrame f = new JFrame("Monster Muncher");
		Container c = f.getContentPane();
		c.setLayout(new GridBagLayout());
		final int width = 9, height = 9;

		GridBagConstraints gbc = new GridBagConstraints();

		JLabel[][] label = new JLabel[width][height];
		for (int i = 0; i < width; i++)
		{
			for (int j = 0; j < height; j++)
			{
				boolean isStage = true;
				label[i][j] = new JLabel();
				// label[i][j].setText("Co-Ords " + i + "," + j);
				label[i][j].setBorder(BorderFactory
						.createLineBorder(Color.BLACK));
				label[i][j].setPreferredSize(new Dimension(80, 80));
				label[i][j].setOpaque(true);

				if ((i > 0 && i < 8) && i != 4)
				{
					if ((j > 0 && j < 8) && j != 4)
					{
						isStage = false;
					}
				}

				if (isStage == false)
				{
					label[i][j].setBackground(Color.BLACK);
				}
				else
				{
					label[i][j].setBackground(Color.WHITE);
				}

				gbc.gridx = j + 1;
				gbc.gridy = i + 1;
				c.add(label[i][j], gbc);
			}
		}

		f.pack();
		f.setResizable(false);
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setVisible(true);
	}
}
